package com.wzx.user.service;

import com.aliyuncs.exceptions.ClientException;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wzx.common.exception.LeadNewsException;
import com.wzx.common.exception.NeedCodeException;
import com.wzx.user.dto.UpdateUserDto;
import com.wzx.user.dto.UserDto;
import com.wzx.user.pojo.User;
import com.wzx.user.vo.RegisterVo;
import com.wzx.user.vo.UserLoginVo;
import com.wzx.user.vo.UserVo;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.io.Serializable;

/**
 * @author wzx
 * @version 1.0
 * @date 2022/4/18 - 19:23
 * @description 标题
 */
public interface UserServcie extends IService<User> {
    UserDto login(UserLoginVo userLoginVo) throws Exception;

    String register(RegisterVo registerVo) throws LeadNewsException;

    String reset(RegisterVo registerVo) throws LeadNewsException;

    UserDto getUserInfo(Integer userId);

    void getYzm(Serializable phone) throws LeadNewsException, ClientException;

    boolean updateUserInfo(UserVo userVo) throws Exception;

    String updateUserHead(MultipartFile file, long userId) throws IOException, LeadNewsException;

    UserDto loginByCode(RegisterVo registerVo) throws LeadNewsException, NeedCodeException;

    void updatePwd(UpdateUserDto user) throws LeadNewsException;

    void forwardPwdSendCode(String phone, Integer userId) throws LeadNewsException, ClientException;

    void forwardPwd(UpdateUserDto updateUserDto) throws LeadNewsException;

    void logOff(Integer userId);

    UserDto loginByIphone(String phone) throws LeadNewsException;

    UserDto loginByVisitor();

    String queryUserImgCode(String phone);

    UserDto loginByUserAmount(UserLoginVo userLoginVo) throws LeadNewsException, NeedCodeException;

    int queryCountUser();
}
